Skip to content

WIP: feat: remove jsrsasign dependancy #356

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Sep 19, 2018

Conversation

Toxicable
Copy link
Contributor

@Toxicable Toxicable commented Jun 15, 2018

Removes the dependency of jsrsasign and replaces it with
https://developer.mozilla.org/en-US/docs/Web/API/Crypto/subtle
Which has reasonable browser support and a shim otherwise.
https://caniuse.com/#search=SubtleCrypto
https://github.com/vibornoff/webcrypto-shim

This change introduces two breaking changes

  • If you are using a browser unsupported by SubtleCrypto then you'll need the pollyfill
  • If you implement ValidationHandler then you'll need to update validateAtHash to return a promise

You should be saving up to 227kb off your bundle size with this chance since jsrsasign is completely removed. See #196
This also makes this library more compatible with downstream typescript compilers, such as when being used with Bazel's ts_library

@manfredsteyer
Copy link
Owner

Thx! This is great!

@manfredsteyer manfredsteyer merged commit f49190e into manfredsteyer:master Sep 19, 2018
@AlQuraian
Copy link

Thanks @Toxicable for this!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants